package com.quanshu.change.broadcast;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

/**
 * 作者  李哲
 * 创建时间 2018/9/1
 * 邮箱 lizhetongliao@163.com
 * 说明
 **/
public class PayResultBroadcatReciver extends BroadcastReceiver {
    public static final String PAY_GOLD_RECHAGR_SUCCESSFUL = "pay_gold_recharge_successful";
    private PayResultSuccessfulListener payResultSuccessfulListener;

    public PayResultBroadcatReciver(PayResultSuccessfulListener payResultSuccessfulListener) {
        this.payResultSuccessfulListener = payResultSuccessfulListener;
    }

    @Override
    public void onReceive(Context context, Intent intent) {
        if (intent.getAction().equals(PAY_GOLD_RECHAGR_SUCCESSFUL)) {
            payResultSuccessfulListener.paySuccess();
        }
    }

    public interface PayResultSuccessfulListener {
        void paySuccess();
    }
}
